package tests;

import static org.junit.Assert.*;

import org.junit.Test;

import app.Car;
import app.DriverNameException;
import app.Name;
import app.RegistrationFormatException;




public class CarTest {

	@Test
	public void testEqual() throws RegistrationFormatException, DriverNameException {
		 Name name1 = new Name ("Freddy Wong");
		 Name name2 = new Name ("John Zhang");
		 Car car1 = new Car("HW01 ABC",name1); 
		 Car car2 = new Car("HW01 ABC",name2);    
		 assertTrue(car1.equals(car2));
		 
		 
		 Car car3 = new Car("HW02 ABC",name2);  
		 assertFalse(car1.equals(car3));
		 	 
		
	}

}
